<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.tcl</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Tcl/Tk) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;"># tcl syntax highlighting sample script for Kate</span>
<span style="color:#7a7c7d;">#</span>
<span style="color:#7a7c7d;"># author: JM. Philippe 15/03/04</span>

<span style="color:#7a7c7d;"># escaped characters</span>
<span style="font-weight:bold;">set</span> String <span style="color:#3daee9;">\{</span>
<span style="font-weight:bold;">set</span> String <span style="color:#3daee9;">\{</span>
<span style="font-weight:bold;">set</span> String <span style="color:#3daee9;">\&quot;</span>
<span style="font-weight:bold;">set</span> String <span style="color:#f44f4f;">&quot; </span><span style="color:#3daee9;">\&quot;</span><span style="color:#f44f4f;"> &quot;</span>
<span style="font-weight:bold;">set</span> String <span style="color:#f44f4f;">&quot; </span><span style="color:#3daee9;">\{</span><span style="color:#f44f4f;"> &quot;</span>

<span style="color:#7a7c7d;">#comments and not comments</span>
<span style="color:#7a7c7d;"># is comments</span>
;<span style="color:#7a7c7d;">#is comments</span>
	<span style="color:#7a7c7d;"># is comments</span>
<span style="color:#7a7c7d;"># &lt;h1&gt; is html comment &lt;/h1&gt;</span>
<span style="font-weight:bold;">puts</span> ok;	<span style="color:#7a7c7d;"># is comments</span>
<span style="font-weight:bold;">set</span> String <span style="font-weight:bold;">[string</span> <span style="color:#27ae60;">map</span> <span style="font-weight:bold;">{</span>&lt;/a&gt; <span style="font-weight:bold;">{</span>&lt;span&gt;&amp;#187;<span style="color:#27ae60;">is</span> not comments&lt;/span&gt;&lt;/a&gt;<span style="font-weight:bold;">}}</span> <span style="color:#2980b9;">$String</span><span style="font-weight:bold;">]</span>
<span style="font-weight:bold;">set</span> String <span style="color:#3daee9;">\#</span>not_a_comment

<span style="color:#7a7c7d;"># blocks</span>
<span style="font-weight:bold;">proc</span> test <span style="font-weight:bold;">{</span>arg1 <span style="font-weight:bold;">{</span>arg2 <span style="font-weight:bold;">{}}</span> <span style="font-weight:bold;">{</span>arg3 <span style="font-weight:bold;">{</span>fr fq r<span style="font-weight:bold;">}}}</span> <span style="font-weight:bold;">{</span>
	<span style="font-weight:bold;">if</span> <span style="font-weight:bold;">{</span><span style="color:#f67400;">1</span><span style="font-weight:bold;">}</span> <span style="font-weight:bold;">{</span>;	<span style="color:#7a7c7d;">#comments</span>
		<span style="font-weight:bold;">set</span> String <span style="color:#3daee9;">\{</span>;	<span style="color:#7a7c7d;"># not a block start</span>
	<span style="font-weight:bold;">}</span>
<span style="font-weight:bold;">}</span>

<span style="font-weight:bold;">proc</span> test <span style="color:#27ae60;">args</span> <span style="font-weight:bold;">{</span>
	<span style="font-weight:bold;">set</span> String <span style="color:#3daee9;">\}</span>;	<span style="color:#7a7c7d;"># not a block end</span>
<span style="font-weight:bold;">}</span>

<span style="color:#2980b9;background-color:#153042;"># BEGIN - collapsable comments</span>
<span style="color:#7a7c7d;"># blablabla</span>
<span style="color:#2980b9;background-color:#153042;"># END</span>

<span style="color:#7a7c7d;"># strings</span>
<span style="font-weight:bold;">set</span> String <span style="color:#f44f4f;">&quot;feqr feqr </span><span style="color:#2980b9;">$</span><span style="color:#f44f4f;">gqer gqe&quot;</span>
<span style="font-weight:bold;">set</span> String <span style="color:#f44f4f;">&quot;feqr</span>
<span style="color:#f44f4f;">feqr </span><span style="color:#3daee9;">\&quot;</span><span style="color:#f44f4f;"> </span><span style="color:#2980b9;">$</span><span style="color:#f44f4f;">gqer \</span>
<span style="color:#f44f4f;">gqe</span>
<span style="color:#f44f4f;">&quot;</span>
<span style="font-weight:bold;">set</span> String <span style="font-weight:bold;">{</span>feqr
feqr <span style="color:#3daee9;">\{</span> <span style="color:#2980b9;">$gqer</span> \
gqe
<span style="font-weight:bold;">}</span>

<span style="color:#7a7c7d;"># variables</span>
<span style="font-weight:bold;">set</span> b+<span style="color:#f67400;">1</span> <span style="font-weight:bold;">[incr</span> b<span style="font-weight:bold;">]</span>
<span style="font-weight:bold;">set</span> <span style="font-weight:bold;">{incr</span>-b<span style="font-weight:bold;">}</span> <span style="color:#2980b9;">${b+1}</span>
<span style="font-weight:bold;">puts</span> <span style="color:#2980b9;">${incr-b}</span>
</pre></body></html>
